
<as:AppSchemaDataAccess xmlns:as="http://www.geotools.org/app-schema"
	xmlns:ogc="http://www.opengis.net/ogc" xmlns:xs="http://www.w3.org/2001/XMLSchema"
	xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
	xsi:schemaLocation="http://www.geotools.org/app-schema AppSchemaDataAccess.xsd http://www.opengis.net/ogc http://schemas.opengis.net/filter/1.1.0/expr.xsd">
	<namespaces>
		<Namespace>
			<prefix>wml2dr</prefix>
			<uri>http://www.opengis.net/waterml/DR/2.0</uri>
		</Namespace>
		<Namespace>
			<prefix>gml</prefix>
			<uri>http://www.opengis.net/gml/3.2</uri>
		</Namespace>
		<Namespace>
			<prefix>xlink</prefix>
			<uri>http://www.w3.org/1999/xlink</uri>
		</Namespace>
		<Namespace>
			<prefix>gmlcov</prefix>
			<uri>http://www.opengis.net/gmlcov/1.0</uri>
		</Namespace>
		<Namespace>
			<prefix>xsi</prefix>
			<uri>http://www.w3.org/2001/XMLSchema-instance</uri>
		</Namespace>
	</namespaces>
	<sourceDataStores>
		<DataStore>
			<id>timeseries</id>
			<parameters>
				<Parameter>
					<name>directory</name>
					<value>file:./</value>
				</Parameter>
			</parameters>
		</DataStore>
	</sourceDataStores>	
	<catalog>wml2dr_catalog.xml</catalog>
	<targetTypes>
		<FeatureType>
			<schemaUri>http://schemas.opengis.net/waterml/DR/2.0/timeseries-domain-range.xsd</schemaUri>
		</FeatureType>
	</targetTypes>
	<typeMappings>
		<FeatureTypeMapping>
			<sourceDataStore>timeseries</sourceDataStore>
			<sourceType>timeseries</sourceType>
			<targetElement>wml2dr:MeasurementTimeseriesDomainRange</targetElement>
			<attributeMappings>
				<AttributeMapping>
					<targetAttribute>wml2dr:MeasurementTimeseriesDomainRange</targetAttribute>
					<idExpression>
						<OCQL>ID</OCQL>
					</idExpression>
				</AttributeMapping>
				<AttributeMapping>
					<targetAttribute>gml:coverageFunction/gml:MappingRule</targetAttribute>
					<sourceExpression>
						<OCQL>'string'</OCQL>
					</sourceExpression>
				</AttributeMapping>
				<AttributeMapping>
					<targetAttribute>gmlcov:rangeType</targetAttribute>
					<ClientProperty>
						<name>xlink:href</name>
						<value>'http://ns.bgs.ac.uk/thesaurus/lithostratigraphy'</value>
					</ClientProperty>
				</AttributeMapping>
				<AttributeMapping>
					<targetAttribute>gml:domainSet</targetAttribute>
					<targetAttributeNode>wml2dr:TimePositionListPropertyType</targetAttributeNode>
				</AttributeMapping>
				<AttributeMapping>
					<targetAttribute>gml:domainSet/wml2dr:TimePositionList</targetAttribute>
					<idExpression>
						<OCQL>strConcat('tpl.', ID)</OCQL>
					</idExpression>
				</AttributeMapping>
				<AttributeMapping>
					<targetAttribute>gml:domainSet/wml2dr:TimePositionList/wml2dr:timePositionList</targetAttribute>
					<sourceExpression>
						<OCQL>POSITION</OCQL>
					</sourceExpression>
					<isList>true</isList>
				</AttributeMapping>
				<AttributeMapping>
					<targetAttribute>gml:rangeSet/gml:QuantityList</targetAttribute>
					<sourceExpression>
						<OCQL>RANGE</OCQL>
					</sourceExpression>
					<isList>true</isList>										
					<ClientProperty>
					   <name>uom</name>
					   <value>'degC'</value>
					</ClientProperty>
				</AttributeMapping>
			</attributeMappings>
		</FeatureTypeMapping>
	</typeMappings>
</as:AppSchemaDataAccess>